-- GENERATED SPELL FOR [Witherbark Headhunter] --


function spell0_2556(pUnit, Event) --@Execute,n/a--
pUnit:FullCastSpellOnTarget(7160,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2556', 0, 1)
end

function spell1_2556(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(6533,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2556', 2350, 1)
end

function spell2_2556(pUnit, Event) --@Wither Touch,n/a--
pUnit:FullCastSpellOnTarget(4974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2556', 594, 1)
end

function Sorts_2556(pUnit, Event)
local choix_sorts_2556 = math.random(0, 2)
if choix_sorts_2556 == 0 then
pUnit:RegisterEvent('spell0_2556', 1, 1)
end
if choix_sorts_2556 == 1 then
pUnit:RegisterEvent('spell1_2556', 1, 1)
end
if choix_sorts_2556 == 2 then
pUnit:RegisterEvent('spell2_2556', 1, 1)
end
end

function mob2556_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2556', math.random(1500, 3000), 1)
end

function mob2556_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2556_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2556_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2556, 1, 'mob2556_Action')
RegisterUnitEvent(2556, 2, 'mob2556_Leave')
RegisterUnitEvent(2556, 3, 'mob2556_Kill')
RegisterUnitEvent(2556, 4, 'mob2556_Die')
